﻿using Minotaur.App.Domains.Dto;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Minotaur.App.Core
{
    public interface IDbContext
    {
        /// <summary>
        /// 平台库
        /// </summary>
        ISqlSugarClient MasterDb { get; }

        /// <summary>
        /// 基础信息库
        /// </summary>
        ISqlSugarClient BusinessDb { get; }
        /// <summary>
        /// 文件库
        /// </summary>
        ISqlSugarClient FileDb { get; }
        /// <summary>
        /// 表单库
        /// </summary>
        ISqlSugarClient FormDb { get; }

        /// <summary>
        /// 流程库
        /// </summary>
        ISqlSugarClient FlowDb { get; }


        /// <summary>
        /// 根据编码获取数据库
        /// </summary>
        /// <param name="tenantCode"></param>
        /// <returns></returns>
        ISqlSugarClient GetDB(string tenantCode, string dataBaseType);

        /// <summary>
        /// 当前登录用户
        /// </summary>
        GlobalUserModel GlobalUserModel { get; set; }

        /// <summary>
        /// 多个库
        /// </summary>
        SqlSugarClient SqlSugarClient { get; }
    }
}
